<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>

<body>
   
</body>
<script>
   

   let arr = [1,5,6,10,4,6,2,7,4]
   console.log(arr.sort((a, b) => b - a));
</script>

</html>